#ifndef PROJECTRUNNER_H
#define PROJECTRUNNER_H

#include <QObject>
#include <QProcess>

namespace Plugins
{
    class IConsole;
    class Project;
    class ProjectRunner : public QObject
    {
        Q_OBJECT
    public:
        explicit ProjectRunner(IConsole* console, Project *project, QObject *parent = 0);
        virtual ~ProjectRunner();
        void start();
        void stop();
    signals:
        void finished();
    private slots:
        void onReadyRead();
        void onReadyReadError();
        void onRunFinished(int);
        void onRunError(QProcess::ProcessError);
    private:
        IConsole *_console;
        Project *_project;
        QProcess * _proc;
    };
}

#endif // PROJECTRUNNER_H
